home *** CD-ROM | disk | FTP | other *** search
/ WWW Studio 2004 / WWW Studio.iso / Programy / Demo / angielskidemo_setup.exe / #setuppath# / 5.dxr / 00042_kolor.ls < prev    next >
Encoding:
Text File  |  2004-02-01  |  4.3 KB  |  190 lines

  1. global gtlo, kolor_Pactions, kolor_activecolor, gv_currentnr, gv_shapes, gv_litery, gv_tlumaczenie
  2.  
  3. on kolor_begin
  4.   global gCurrentBMPCoords, gcurrenttlo
  5.   gCurrentBMPCoords = "BMPCoords"
  6.   show(21, 27)
  7.   setfromcoords(52 - gfang_checknagroda(#kolor), 84)
  8.   dialog_drukowanie(#init)
  9.   gcurrenttlo = "music_menu.wav"
  10.   puppetTloOFF()
  11. end
  12.  
  13. on kolor_firstenter
  14.   SetVisibility(0, 120)
  15.   kolorowanka_set(gv_currentnr)
  16.   if not gf_checkfirstenter() then
  17.     gf_setfirstenter()
  18.     kolor_text("5_01.WAV", 1)
  19.   end if
  20. end
  21.  
  22. on kolor_ef
  23.   sequenceaction()
  24.   gf_tlo()
  25. end
  26.  
  27. on kolor_end
  28. end
  29.  
  30. on kolor_PFspr spnr
  31.   case spnr of
  32.     41, 42, 43, 44, 44, 45, 46:
  33.       setfromcoords(((spnr - 40) * 3) - 1, spnr)
  34.     81, 82:
  35.       setfromcoords(spnr - 40 + 2, spnr)
  36.     84:
  37.       setfromcoords(53, 84)
  38.   end case
  39. end
  40.  
  41. on kolor_Pspr spnr
  42.   case spnr of
  43.     41, 42, 43, 44, 44, 45, 46:
  44.       L = [41: "5_18P.WAV", 42: "5_17P.WAV", 43: "kropla_p.WAV", 44: "5_16P.WAV", 45: "10_05P.WAV", 46: "5_19P.WAV"]
  45.       snd = getaProp(L, spnr)
  46.       if not voidp(snd) then
  47.         Paction_sound(snd)
  48.       end if
  49.     51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64:
  50.       L = [2, 3, 5, 6, 14, 4, 8, 7, 12, 10, 15, 13, 9, 11]
  51.       snd = "5_" & cvtint2str(getAt(L, spnr - 50), 2)
  52.       if gv_tlumaczenie then
  53.         snd = snd & "t"
  54.       end if
  55.       Paction_sound(snd & "p.wav")
  56.     81:
  57.       Paction_sound("10_02p.wav")
  58.       FX("10_0201p.wav")
  59.     82:
  60.       if gv_tlumaczenie then
  61.         Paction_sound("10_1003w.wav")
  62.       else
  63.         Paction_sound("10_03p.wav")
  64.       end if
  65.     84:
  66.       if gfang_checknagroda(#kolor) then
  67.         Paction_sound("10_1001P.WAV")
  68.       else
  69.         Paction_sound("10_10P.WAV")
  70.       end if
  71.   end case
  72. end
  73.  
  74. on kolor_Dspr spnr
  75.   case spnr of
  76.     41, 42, 43, 44, 44, 45, 46:
  77.       setfromcoords((spnr - 40) * 3, spnr)
  78.     81, 82:
  79.       setfromcoords(spnr - 40 + 4, spnr)
  80.     84:
  81.       setfromcoords(54, 84)
  82.   end case
  83. end
  84.  
  85. on kolor_Lspr spnr
  86.   case spnr of
  87.     41, 42, 43, 44, 44, 45, 46:
  88.       setfromcoords(((spnr - 40) * 3) - 2, spnr)
  89.       Laction()
  90.     51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64:
  91.       Laction()
  92.     81, 82:
  93.       setfromcoords(spnr - 40, spnr)
  94.       Laction()
  95.       puppetFXOFF()
  96.     84:
  97.       setfromcoords(52 - gfang_checknagroda(#kolor), 84)
  98.       Laction()
  99.   end case
  100. end
  101.  
  102. on kolor_Wspr spnr
  103.   global kolorzadanie_currentnr
  104.   Laction()
  105.   case spnr of
  106.     41:
  107.       kolor_set(gv_currentnr - 1)
  108.       FX("5_1801P.WAV")
  109.     42:
  110.       kolor_set(gv_currentnr + 1)
  111.       FX("5_1801P.WAV")
  112.     43:
  113.       kolorowanka_clear()
  114.     44:
  115.       kolorowanka_undo()
  116.       FX("5_16P_GUMKA.WAV")
  117.     45:
  118.       kolorowanka_zapamietajstan(gv_currentnr)
  119.       dialog_drukowanie(#show, "10_05P.WAV")
  120.     46:
  121.       kolor_text("5_01w.WAV", 1)
  122.     51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64:
  123.       kolor_setcolor(spnr - 50, 1)
  124.     81:
  125.       gf_actiongomovie("2.dir")
  126.     82:
  127.       gv_tlumaczenie = 1 - gv_tlumaczenie
  128.     84:
  129.       kolorowanka_zapamietajstan(gv_currentnr)
  130.       if not inteligentrandom_isinit(#kolorowankazadanie) then
  131.         inteligentrandom_init([1, 2, 3], #kolorowankazadanie)
  132.       end if
  133.       kolorzadanie_currentnr = inteligentrandom(#kolorowankazadanie)
  134.       gf_actiongo("kolorzadanie" & kolorzadanie_currentnr, #none)
  135.     144:
  136.       go("drukowanie")
  137.   end case
  138. end
  139.  
  140. on kolor_setcolor nr, _FX
  141.   global gv_colortable, kolorowanka_sprite
  142.   if not voidp(nr) then
  143.     kolor_activecolor = nr
  144.   end if
  145.   setbrush(kolorowanka_sprite, getAt(gv_colortable, kolor_activecolor))
  146.   if _FX then
  147.     FX("5_1501P.WAV")
  148.   end if
  149.   updateStage()
  150. end
  151.  
  152. on kolor_set nr
  153.   if not voidp(nr) then
  154.     kolorowanka_zapamietajstan(gv_currentnr)
  155.     gv_currentnr = nr
  156.     n = the number of lines in field "kolorowanki.cfg"
  157.     if gv_currentnr <= 0 then
  158.       gv_currentnr = n
  159.     end if
  160.     if gv_currentnr > n then
  161.       gv_currentnr = 1
  162.     end if
  163.   end if
  164.   kolorowanka_set(gv_currentnr)
  165. end
  166.  
  167. on kolor_text WAV, block, extconfirm
  168.   if voidp(extconfirm) then
  169.     extconfirm = "kolor_textcompl(" & block & ")"
  170.   end if
  171.   if block then
  172.     gf_setconfirm(extconfirm)
  173.   end if
  174.   symb = #text
  175.   sequenceaction_clear(symb)
  176.   sequenceaction_addsound(WAV, symb)
  177.   sequenceaction_addaction(extconfirm, VOID, symb)
  178.   sequenceaction()
  179. end
  180.  
  181. on kolor_textcompl block
  182.   symb = #text
  183.   if block then
  184.     gf_clearconfirm(1)
  185.   end if
  186.   sequenceaction_clear(symb)
  187.   puppetSoundOFF()
  188.   updateStage()
  189. end
  190.